package com.aptemo.webetek.server.handlers;

import com.aptemo.webetek.client.commands.Action;
import com.aptemo.webetek.client.commands.impl.DeleteLabelAction;
import com.aptemo.webetek.client.commands.responses.ResponseStatus;
import com.aptemo.webetek.client.exceptions.BackendException;
import com.aptemo.webetek.client.exceptions.WebetekLoginException;
import com.aptemo.webetek.server.datastore.DataStoreAPI;

public class DeleteLabelHandler
		extends ActionHandler<DeleteLabelAction, ResponseStatus>
{

	public DeleteLabelHandler(DataStoreAPI service)
	{
		super(service);
	}

	public Class<? extends Action<?>> getActionType()
	{
		return DeleteLabelAction.class;
	}

	@Override
	public ResponseStatus invoke(DeleteLabelAction action) throws BackendException, WebetekLoginException
	{
		return new ResponseStatus(dataService.deleteLabel(action.getId()));
		// return mparent.deleteBetLabel(action.getId());
	}

}
